<template>
	<view class="order-container" style="">
		<block v-if="goodsItem.length">
			<view class="">
				<scroll-view class="order-list" :scroll-y="true" @scrolltolower="scrolltolower">
					<view class="order-item" v-for="(item, index) in goodsItem" :key="index">
						<view class="item-header clearfix">
							<text class="create-time f-left">{{item.order_no}}</text>
							<text class="status-name f-right ns-text-color-gray">{{ $util.timeStampTurnTime(item.create_time) }}</text>
						</view>
						<view class="item-body" v-for="(goodsItem, goodsKey) in item.order_item_list">
							<view class="order-goods-item">
								<navigator class="goods-img" >
									<image :src="$util.img(goodsItem.picture.pic_cover_small)" mode="aspectFill"></image>
								</navigator>
								<view class="goods-info">
									<navigator class="goods-name">
										<!-- <view class="gift-mark" v-if="goodsItem.gift_flag == 1">赠品</view> -->
										{{goodsItem.goods_name}}
									</navigator>
									<text class="text ns-text-color">
										<text class="ns-text-color-gray">价格：</text>
										￥{{ goodsItem.price }}
									</text>
									<text class="text" v-if="goodsItem.sku_name">
										<text class="ns-text-color-gray">规格：</text>
										{{ goodsItem.sku_name }}
									</text>
									<text class="text">
										<text class="ns-text-color-gray">数量：</text>
										{{ goodsItem.num }}盒
									</text>
								</view>
							</view>
							
						</view>
						<view  class="item-body">
							<view class="order-info" >
								<view>
									<text class="ns-text-color">{{ item.order_type_name }}</text>
									<text>{{ item.status_name }}</text>
								</view>
								<view>
									<text class="ns-text-color-gray">
										总价:
										<text class="ns-text-color ns-font-size-lg">￥{{ item.order_money }}</text>
									</text>
								</view>
							</view>
						</view>
						
						
					</view>
					
				</scroll-view>
			</view>
		</block>
		<block v-else>
			<view class="empty">
				<image src="" mode="aspectFit" class="empty-image"></image>
				<view class="ns-text-color-gray">暂无相关订单</view>
			</view>
		</block>
		
	</view>
	
</template>

<script>
	import http from 'common/js/http.js';
	export default {
		
		data() {
			return {
				goodsItem:'',
				
			};
		},
		mixins: [http],
		onLoad(e) {
			console.log("e================",e)
			this.getlist(e.e,e.jibie);
		},
		onShow() {
		},
		methods: {
			getlist(e,jibie){
				this.sendRequest({
					url: 'System.Promotion.memberOrders',
					data: {
						id:e,
						jibie:jibie
					},
					success: res => {
						
						
						if(res.data.data){
							this.goodsItem=res.data.data
							console.log('res==========',res)
						}else{
						}
					}
				});
			}
			
		}
	};
</script>


<style lang="scss">
@import '../order/public/css/list.scss';
</style>
<style scoped>
.order-container .order-nav .uni-scroll-view::-webkit-scrollbar {
	display: none;
}
</style>